package com.alu4r.atcrowdfunding.manager.service;

import com.alu4r.atcrowdfunding.VO.Data;
import com.alu4r.atcrowdfunding.bean.Permission;
import com.alu4r.atcrowdfunding.bean.Role;
import com.alu4r.atcrowdfunding.bean.User;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Map;

public interface UserService {

    User queryUserlogin(Map<String, Object> map);

    Boolean insertUserRegister(User user);

    PageInfo getPage(Integer pageNum, Integer pageSize);

    PageInfo getPage(Map<String, Object> map);

    boolean insertUser(User user);

    User getUser(Integer id);

    boolean updateUser(User user);

    boolean deleteUser(Integer id);

    boolean deleteBatch(Integer[] ids);

    List<Integer> queryRoleByUserId(Integer id);

    List<Role> queryAllRole();

    boolean insertUserRoleRelationship(Integer userId, Data data);

    boolean deleteUserRoleRelationship(Integer userId, Data data);

    List<Permission> getPermissionByUserId(Integer id);
}
